# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=krename
pkgver=5.0.1
pkgrel=1
# armhf blocked by extra-cmake-modules
# s390x and riscv64 blocked by polkit -> kio
arch="all !armhf !s390x !riscv64"
url="https://apps.kde.org/en/krename"
pkgdesc="Utility to handle specialized file renames"
license="GPL-2.0-or-later"
makedepends="
	extra-cmake-modules
	kcompletion-dev
	kconfig-dev
	kcoreaddons-dev
	kcrash-dev
	ki18n-dev
	kiconthemes-dev
	kio-dev
	kitemviews-dev
	kjobwidgets-dev
	kjs-dev
	kservice-dev
	kwidgetsaddons-dev
	kxmlgui-dev
	qt5-qtbase-dev
	samurai
	"
source="https://download.kde.org/stable/krename/$pkgver/src/krename-$pkgver.tar.xz"
subpackages="$pkgname-lang"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="1e8b17d9b8396354da131132fb6add24c6620ac39ab7ea5954391358369a4749f83df040e8425c74442ec143d1f07b322e592e5744f80eeef4b961d72f9dd379  krename-5.0.1.tar.xz"
